Note: If you are unfamiliar with the shell wildcards used by the "match" command, you may wish to review section 06, "Wildcards", of the nShell User's Guide.
Examples:
A simple example of a search would be a search for copyright notices:
% match * -p Copyright
The thing is, not everyone may have remembered to capitalize the word copyright. There are two solutions. First of all, we could simplify the search to the last part of the word, relying on the fact that few words end with "opyright":
% match * -p opyright
Secondly, we could use a "[]" clause to select either small or large "C":
% match * -p '[Cc]opyright'
When the pattern contains wildcards, it's best to enclose it within single quotes.
In these examples a "*" wildcard is used to search the current directory. We might use an extended path to search other places. The following command would search all ".h" files in the "include" folder for the pattern "printf":
% match :includes:*.h -p printf
The following script makes use of the "sfget" command to search a series of directories. The script continues until the user selects "cancel" in the "sfget" dialog: